<?
if (!headers_sent()) session_start();
ob_start();
//
function file_exist($fname){
	if(!file_exists($fname)){
		echo "No exist file " . $fname;
		exit();
	}
}
file_exist('rewrite_config.php');
require('rewrite_config.php');
// == class db
file_exist('lib/mysql.php');
require('lib/mysql.php');
$db = new mysql();
// == class paging
file_exist('lib/paging.php');
require('lib/paging.php');
// == calss upload
file_exist('lib/upload.php');
require('lib/upload.php');
$upload = new upload();
//== class string
file_exist('lib/string.php');
require('lib/string.php');
$myString = new myString();

//--Connect--//
file_exist('includes/info_db.php');
require('includes/info_db.php');
$db->connect($db_host, $db_user, $db_pass, $db_name);
//-----//
$PathFile = "upload/";
$PathThumbFile = "upload/thumb/";
$PathIconFile = "upload/icon/";
///////
mysql_query("SET NAMES 'UTF8'");
//
file_exist('lib/function.php');
require('lib/function.php');
// Ham he thong website
file_exist('includes/function.php');
require('includes/function.php');

///Include data
file_exist('includes/data/data.php');
require('includes/data/data.php');

//HAm URL 


//
$PathFile = "upload/";
$PathThumbFile = "upload/thumb/";
$imgWidth = 120;
$imgHeight = 120;
$PathFileDoc = "upload/document/";
///
$homepage = "localhost/onepixel";

$urlHome = "".$root."/trang-chu/";
function reHome($urlHome){
	header("Location: ".$urlHome."");
}


///
// u_banned = 0 da bi banned = 1 chua banned
?>